#@layout()
#define main()
  <form action="#(path)/portal/business/iCustomerInfo/update" class="layui-form layui-form-pane f-form" method="post" autocomplete="off">

      #(token)
      <div class="layui-row layui-col-space1 task-row">
          #@colStart("姓名",6)
          <input type="text" class="layui-input"  name="iCustomerInfo.customername" value="#(iCustomerInfo.customername??)" lay-verType='tips'lay-verify="" maxlength="100"/>
          #@colEnd()
          #@colStart('性别',6)
          <input name="sysUser.sex" type="radio" value="1" title="男"
                 #if(iCustomerInfo.gender??==1||sysUser==null)checked="checked"#end/>
          <input name="sysUser.sex" type="radio" value="0"  title="女"
                 #if(iCustomerInfo.gender??==0)checked="checked"#end/>
          #@colEnd()
      </div>
      <div class="layui-row layui-col-space1 task-row">
          #@colStart("年龄",6)
          <input type="text" class="layui-input"  name="iCustomerInfo.age" value="#(iCustomerInfo.age??)" lay-verType='tips'lay-verify="" maxlength="100"/>
          #@colEnd()
          #@colStart("联系方式",6)
          <input pattern="^1[3-9]\d{9}$" required title="请输入有效的中国大陆手机号码"
                 type="text" class="layui-input"  name="iCustomerInfo.phonenum" value="#(iCustomerInfo.phonenum??)" lay-verType='tips'lay-verify="" maxlength="100"/>
          #@colEnd()
      </div>
      <div class="layui-row layui-col-space1 task-row">
          #@colStart("证件号",6)
          <input pattern="^[1-9]\d{5}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$" required title="请输入有效的中国大陆居民身份证号码"
                 type="text" class="layui-input"  name="iCustomerInfo.idcard" value="#(iCustomerInfo.idcard??)" lay-verType='tips'lay-verify="" maxlength="100"/>
          #@colEnd()

          #@colStart("设备ID",6)
          <input type="text" id="devideid" name="iCustomerInfo.devideid"  autocomplete="off"
                 class="layui-input" value="#(iCustomerInfo.devideid??)"/>
          #@colEnd()
      </div>
      <input type="hidden" class="layui-input"  name="iCustomerInfo.id" value="#(iCustomerInfo.id??)" />
      #@submitButton()
  </form>
#end
#define js()
<script type="text/javascript">
    //引入自定义插件
    layui.extend({
        yutons_sug: '#(path)/static/libs/layui_extends/yutons_sug',
    }).use(['yutons_sug'], function() {
        //创建yutons_sug搜索框提示插件||输入框提示插件实例
        var yutons_sug = layui.yutons_sug;
        sessionStorage.setItem("url", "#(path)/portal/business/iDeviceInfo/querydevice");
        var devideids = document.getElementById("devideid").value;
        //初始化姓名输入提示框
        yutons_sug.render({
            id: "devideid", //设置容器唯一id
            height: "167",
            cols: [
                [{
                    field: 'devideid',
                    title: '设备ID'
                }, {
                    field: 'binduser',
                    title: '绑定患者'
                }]
            ], //设置表头
            params: [
                {
                    name: 'devideid',
                    field: 'devideid'
                }, {
                    name: 'binduser',
                    field: 'binduser'
                }],//设置字段映射，适用于输入一个字段，回显多个字段
            type: 'sugTable', //设置输入框提示类型：sug-下拉框，sugTable-下拉表格
            url: sessionStorage.getItem("url") + "?devideid="+devideids //设置异步数据接口,url为必填项,params为字段名
        });


    });
</script>
#end

